/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80011
 Source Host           : localhost:3306
 Source Schema         : restaurant

 Target Server Type    : MySQL
 Target Server Version : 80011
 File Encoding         : 65001

 Date: 02/08/2019 15:10:55
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
  `id` int(11) NOT NULL,
  `content` varchar(255) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `praise` int(11) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of comment
-- ----------------------------
BEGIN;
INSERT INTO `comment` VALUES (88, 'haohehaohe', 87, 0, '2019-08-02 11:35:49', 69);
INSERT INTO `comment` VALUES (82, '好喝好喝好喝', 81, 0, '2019-08-02 11:03:37', 69);
INSERT INTO `comment` VALUES (79, '好吃好吃好吃', 76, 0, '2019-08-02 10:46:45', 69);
INSERT INTO `comment` VALUES (78, '33333333333', 77, 2, '2019-08-02 10:45:43', 69);
INSERT INTO `comment` VALUES (72, 'dddddddd', 70, 2, '2019-08-02 09:43:41', 69);
COMMIT;

-- ----------------------------
-- Table structure for coupon
-- ----------------------------
DROP TABLE IF EXISTS `coupon`;
CREATE TABLE `coupon` (
  `user_id` int(11) NOT NULL,
  `coupon_series_id` int(11) NOT NULL,
  `receive_time` datetime DEFAULT NULL,
  `used` bit(1) DEFAULT NULL,
  PRIMARY KEY (`user_id`,`coupon_series_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of coupon
-- ----------------------------
BEGIN;
INSERT INTO `coupon` VALUES (69, 85, '2019-08-02 11:33:20', b'0');
INSERT INTO `coupon` VALUES (69, 6, '2019-08-02 09:39:34', b'0');
INSERT INTO `coupon` VALUES (69, 5, '2019-08-02 09:39:33', b'1');
INSERT INTO `coupon` VALUES (69, 4, '2019-08-02 09:39:31', b'0');
COMMIT;

-- ----------------------------
-- Table structure for coupon_series
-- ----------------------------
DROP TABLE IF EXISTS `coupon_series`;
CREATE TABLE `coupon_series` (
  `id` int(11) NOT NULL,
  `effective_time` int(11) DEFAULT NULL,
  `enable` bit(1) DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `mix_limit` decimal(19,2) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `quota` decimal(19,2) DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of coupon_series
-- ----------------------------
BEGIN;
INSERT INTO `coupon_series` VALUES (4, 2, b'1', '2019-08-05 18:18:45', 100.00, '七夕优惠券', 23.00, '2019-07-31 18:18:57');
INSERT INTO `coupon_series` VALUES (5, 2, b'1', '2019-08-05 18:27:11', 200.00, '优惠券', 33.00, '2019-06-28 18:27:18');
INSERT INTO `coupon_series` VALUES (6, 2, b'1', '2019-08-05 20:56:56', 222.00, '大促销优惠券', 22.00, '2019-08-01 20:57:11');
INSERT INTO `coupon_series` VALUES (85, 5, b'1', '2019-08-31 00:00:00', 15.00, '超级无敌优惠价', 14.00, '2019-08-01 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for dishes
-- ----------------------------
DROP TABLE IF EXISTS `dishes`;
CREATE TABLE `dishes` (
  `id` int(11) NOT NULL,
  `dishes_series_id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `photo_url` varchar(255) DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  `resume` varchar(255) DEFAULT NULL,
  `sale_num` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `store_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of dishes
-- ----------------------------
BEGIN;
INSERT INTO `dishes` VALUES (7, 4, '烤鸡中翅', 'http://cp1.douguo.net/upload/caiku/4/d/6/yuan_4d3033164c7b0c6814d9ba0a124cbcc6.jpg', 15.00, '好吃好吃的烤鸡翅', 34, 1, 965);
INSERT INTO `dishes` VALUES (5, 2, '可口可乐', 'http://www.ylcai.com/img/goods/1416793326673.jpg', 5.00, '可乐可乐', 8, 0, 991);
INSERT INTO `dishes` VALUES (6, 2, '怡宝矿泉水', 'http://file01.up71.com/File/CorpProductImages/2014/11/20/0_sook123_1630_20141120152625.jpg', 3.00, '矿泉水', 22, 0, 977);
INSERT INTO `dishes` VALUES (4, 5, '炒粉', 'https://cn.bing.com/th?id=OIP.BRwS3lBqnKnt5AjeCtGwBAHaGi&pid=Api&rs=1', 8.00, '炒粉炒粉', 12, 1, 87);
INSERT INTO `dishes` VALUES (3, 5, '米饭', 'https://cn.bing.com/th?id=OIP.A-fejjzALSYoHPk0q6OoFwHaE7&pid=Api&rs=1', 3.00, '米饭米饭', 8, 0, 991);
INSERT INTO `dishes` VALUES (2, 2, '啤酒', 'http://imgqn.koudaitong.com/upload_files/2015/05/23/FuXvkS_zXZEwAUMWYUebn7b52Jqy.gif%21280x280.jpg', 10.00, '超级好喝的啤酒啊，搭配烧烤饮用最棒噢，这么好吃的烧烤，不喝点啤酒尽尽兴吗？？！！', 70, 0, 929);
INSERT INTO `dishes` VALUES (1, 4, '化州生蚝', 'http://5b0988e595225.cdn.sohucs.com/images/20171218/a9e512b18dd54afc8cd0b05eff7db0b8.jpeg', 35.90, '超级好吃的化州生蚝！！新鲜炭烤生蚝！', 17, 1, 82);
INSERT INTO `dishes` VALUES (8, 4, '烤茄子', 'http://cp1.douguo.net/upload/caiku/b/7/e/yuan_b72d8d644dec4c9c9ce2b7ed795956ce.jpg', 10.00, '超好吃的烤茄子', 11, 0, 988);
INSERT INTO `dishes` VALUES (84, 83, '汉堡', 'https://www.bkchina.cn/website//productimage/5a6ef6ace1c60.png', 20.00, '鸡腿堡', 6, 1, 94);
COMMIT;

-- ----------------------------
-- Table structure for dishes_series
-- ----------------------------
DROP TABLE IF EXISTS `dishes_series`;
CREATE TABLE `dishes_series` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of dishes_series
-- ----------------------------
BEGIN;
INSERT INTO `dishes_series` VALUES (2, '饮料');
INSERT INTO `dishes_series` VALUES (83, '汉堡');
INSERT INTO `dishes_series` VALUES (4, '人气烧烤');
INSERT INTO `dishes_series` VALUES (5, '主食');
COMMIT;

-- ----------------------------
-- Table structure for hibernate_sequence
-- ----------------------------
DROP TABLE IF EXISTS `hibernate_sequence`;
CREATE TABLE `hibernate_sequence` (
  `next_val` bigint(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of hibernate_sequence
-- ----------------------------
BEGIN;
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
INSERT INTO `hibernate_sequence` VALUES (90);
COMMIT;

-- ----------------------------
-- Table structure for my_order
-- ----------------------------
DROP TABLE IF EXISTS `my_order`;
CREATE TABLE `my_order` (
  `id` int(11) NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `pay_id` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `total_amount` decimal(19,2) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of my_order
-- ----------------------------
BEGIN;
INSERT INTO `my_order` VALUES (71, '2019-08-02 09:41:41', NULL, 3, 25.00, '2019-08-02 09:41:47', 69);
INSERT INTO `my_order` VALUES (75, '2019-08-02 09:50:41', NULL, 0, 6.00, '2019-08-02 09:50:41', 69);
INSERT INTO `my_order` VALUES (70, '2019-08-02 09:41:24', NULL, 4, 125.80, '2019-08-02 09:43:41', 69);
INSERT INTO `my_order` VALUES (77, '2019-08-02 09:51:43', 4, 4, 84.90, '2019-08-02 10:45:43', 69);
INSERT INTO `my_order` VALUES (89, '2019-08-02 11:37:38', NULL, 0, 30.00, '2019-08-02 11:37:38', 69);
INSERT INTO `my_order` VALUES (87, '2019-08-02 11:35:13', 5, 4, 177.00, '2019-08-02 11:35:49', 69);
INSERT INTO `my_order` VALUES (86, '2019-08-02 11:11:18', NULL, 3, 120.00, '2019-08-02 11:36:02', 69);
INSERT INTO `my_order` VALUES (81, '2019-08-02 11:00:38', 4, 4, 80.00, '2019-08-02 11:03:37', 69);
INSERT INTO `my_order` VALUES (76, '2019-08-02 09:51:03', NULL, 4, 53.00, '2019-08-02 10:46:45', 69);
INSERT INTO `my_order` VALUES (74, '2019-08-02 09:50:10', NULL, 3, 75.00, '2019-08-02 09:50:10', 69);
INSERT INTO `my_order` VALUES (73, '2019-08-02 09:49:20', NULL, 0, 78.00, '2019-08-02 09:49:20', 69);
COMMIT;

-- ----------------------------
-- Table structure for order_item
-- ----------------------------
DROP TABLE IF EXISTS `order_item`;
CREATE TABLE `order_item` (
  `order_id` int(11) NOT NULL,
  `dishes_id` int(11) NOT NULL,
  `number` int(11) DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  PRIMARY KEY (`order_id`,`dishes_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of order_item
-- ----------------------------
BEGIN;
INSERT INTO `order_item` VALUES (89, 2, 3, 10.00);
INSERT INTO `order_item` VALUES (87, 2, 21, 10.00);
INSERT INTO `order_item` VALUES (86, 84, 6, 20.00);
INSERT INTO `order_item` VALUES (81, 7, 5, 15.00);
INSERT INTO `order_item` VALUES (81, 6, 1, 3.00);
INSERT INTO `order_item` VALUES (81, 5, 1, 5.00);
INSERT INTO `order_item` VALUES (81, 2, 2, 10.00);
INSERT INTO `order_item` VALUES (77, 7, 1, 15.00);
INSERT INTO `order_item` VALUES (77, 4, 6, 8.00);
INSERT INTO `order_item` VALUES (77, 3, 3, 3.00);
INSERT INTO `order_item` VALUES (77, 1, 1, 35.90);
INSERT INTO `order_item` VALUES (76, 6, 1, 3.00);
INSERT INTO `order_item` VALUES (76, 2, 5, 10.00);
INSERT INTO `order_item` VALUES (75, 6, 2, 3.00);
INSERT INTO `order_item` VALUES (74, 7, 5, 15.00);
INSERT INTO `order_item` VALUES (73, 8, 2, 10.00);
INSERT INTO `order_item` VALUES (73, 7, 2, 15.00);
INSERT INTO `order_item` VALUES (73, 6, 2, 3.00);
INSERT INTO `order_item` VALUES (73, 5, 1, 5.00);
INSERT INTO `order_item` VALUES (73, 4, 3, 8.00);
INSERT INTO `order_item` VALUES (73, 3, 2, 3.00);
INSERT INTO `order_item` VALUES (73, 2, 1, 10.00);
INSERT INTO `order_item` VALUES (71, 4, 2, 8.00);
INSERT INTO `order_item` VALUES (71, 3, 3, 3.00);
INSERT INTO `order_item` VALUES (70, 7, 3, 15.00);
INSERT INTO `order_item` VALUES (70, 6, 3, 3.00);
INSERT INTO `order_item` VALUES (70, 1, 2, 35.90);
COMMIT;

-- ----------------------------
-- Table structure for payment
-- ----------------------------
DROP TABLE IF EXISTS `payment`;
CREATE TABLE `payment` (
  `id` int(11) NOT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `pay_state` int(11) DEFAULT NULL,
  `pay_time` datetime DEFAULT NULL,
  `pay_type` int(11) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK4spfnm9si9dowsatcqs5or42i` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Table structure for shop
-- ----------------------------
DROP TABLE IF EXISTS `shop`;
CREATE TABLE `shop` (
  `id` int(11) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `resume` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of shop
-- ----------------------------
BEGIN;
INSERT INTO `shop` VALUES (1, '华南农业大学西门', '庞哥烧烤', '好吃不贵');
COMMIT;

-- ----------------------------
-- Table structure for shopping_cart
-- ----------------------------
DROP TABLE IF EXISTS `shopping_cart`;
CREATE TABLE `shopping_cart` (
  `user_id` int(11) NOT NULL,
  `dishes_id` int(11) NOT NULL,
  `number` int(11) DEFAULT NULL,
  PRIMARY KEY (`user_id`,`dishes_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of shopping_cart
-- ----------------------------
BEGIN;
INSERT INTO `shopping_cart` VALUES (54, 2, 3);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `last_time` datetime DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `open_id` varchar(255) DEFAULT NULL,
  `photo_url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, '2019-07-31 19:08:37', NULL, 'A_Yu', '2222', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLUFQzAS71PjlfAEZ3bWuYHUz3ibCWOicd5YqIZcYkiaYian0h517liaBXnTo5sjop4QqM1ELY1ogyQI8A/132');
INSERT INTO `user` VALUES (2, '2019-07-31 19:08:33', NULL, '臭猪', '333333', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLUFQzAS71PjlfAEZ3bWuYHUz3ibCWOicd5YqIZcYkiaYian0h517liaBXnTo5sjop4QqM1ELY1ogyQI8A/132');
INSERT INTO `user` VALUES (3, '2019-07-31 19:10:18', NULL, '不知道是谁', '444444', 'http://jf258.com/uploads/2015-05-14/190708776.jpg');
INSERT INTO `user` VALUES (69, '2019-08-02 09:37:29', '2019-08-02 11:44:25', 'A_Yu', 'oUP3l5Y9Xj0SSimQAguhfJmoPmOs', 'https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJ4oND4vOib52FO3MjWg1KdzY4sYM4NAhHq76WYumYhq6Wn0sib1c7tl9UvHTaxY4iczTPNic5vsZZvDw/132');
INSERT INTO `user` VALUES (54, '2019-08-01 22:12:59', '2019-08-02 11:24:11', '标', 'oUP3l5Y8lFiO99toBoQUswAaHtT0', 'https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eqrsyVYqlwCib2uiarZK68jkuDXuAFoA5f2GMAF7ELjriarJo06WW3S5ab0gLW3rLnjCerTkOgL6u1RA/132');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
